#后台主题控制器
class Manager::Theme::WmsThemesController < Admin::WmsApplicationController
  def index
    @wms_themes= Theme.all
  end
  def create
    @wms_theme= Theme.new(create_params)
    if can? :create, Theme then
      unless @wms_theme.save
        respond_to do |format|
          format.js
        end

      end
    else
      raise CanCan::AccessDenied
    end
  end



  private
  def create_params
    params.require(:wms_theme).permit(:name, :value)
  end
end
